package com.bussiness.xutai.service.impl;

import com.bussiness.xutai.bean.ShoppingCart;
import com.bussiness.xutai.bean.User;
import com.bussiness.xutai.mapper.ShoppingCartMapper;
import com.bussiness.xutai.service.ShoppingCartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ShoppingCartServiceImpl implements ShoppingCartService {

    @Autowired
    ShoppingCartMapper shoppingCartMapper;

    @Override
    public List<ShoppingCart> getAllByUser(User user) {
        return shoppingCartMapper.selectAllByUser(user);
    }
}
